﻿<%@ Page Title="贵重药品统计" Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="True" CodeBehind="ExpensivedrugsStatistics.aspx.cs" Inherits="TotalDrugs_ExpensivedrugsStatistics" %>
<%@ Register Src="~/Common/QueryControl.ascx" TagName="QueryControl" TagPrefix="uc1" %>

<%@ Register src="../Common/ChartControl.ascx" tagname="ChartControl" tagprefix="uc2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script language="javascript" type="text/javascript">
    function txtClear()
    {
       var txtBox=document.getElementsByTagName("input")
       for(var i=0;i<txtBox.length;i++)
       {
          if(txtBox[i].type=="text")
          {
          txtBox[i].value="";
          }
       }
       document.getElementById("ctl00_ContentPlaceHolder1_ddlQualityLevel").selectedIndex=0;
       document.getElementById("ctl00_ContentPlaceHolder1_ddlInsuranceType").selectedIndex=0;
       document.getElementById("ctl00_ContentPlaceHolder1_ddlSortName").selectedIndex=0;
       document.getElementById("ctl00_ContentPlaceHolder1_ddlLevels").selectedIndex=0;
    }
    </script>

    <script type="text/javascript" src="../Scripts/My97DatePicker/WdatePicker.js"></script>

    <script type="text/javascript" src="../Scripts/PCASClass.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="tabcontent2">
       <uc1:QueryControl ID="QueryControl1" runat="server"  />
    </div>
    <div>
        <asp:GridView ID="gvwInfo" runat="server" AutoGenerateColumns="False" CssClass="mainlist"
            EmptyDataText="暂无符合条件的数据！" onrowcommand="gvwInfo_RowCommand">
            <Columns>
                <asp:TemplateField HeaderText="序号">
                    <ItemTemplate>
                        <%# Container.DataItemIndex+1+AspNetPager1.PageSize*(AspNetPager1.CurrentPageIndex-1) %>
                    </ItemTemplate>
                    <HeaderStyle Width="30px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="是否贵重药品">
                    <ItemTemplate>
                        <asp:Label ID="lab" runat="server" Text='<%#Eval("IsPrecious").ToString()=="True"?"是":"否"%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="采购总数" DataField="PurchaseCountTotal" />
                <asp:BoundField HeaderText="采购总金额" DataField="PurchaseAmountTotal" />
                <asp:BoundField HeaderText="入库总数" DataField="WareHouseCountTotal" />
                <asp:BoundField HeaderText="入库总金额" DataField="WareHouseAmountTotal" />
                <asp:BoundField HeaderText="采购次数" DataField="CountOrder" />
                <asp:TemplateField HeaderText="详情">
                    <ItemTemplate>
                        <asp:LinkButton ID="linkHospital" runat="server" Text="按医院查询"
                         CommandName="Hospital" CommandArgument='<%#Eval("IsPrecious")%>' ></asp:LinkButton>
                        |
                        <asp:LinkButton ID="linkCompany" runat="server" Text="按企业查看"
                        CommandName="Company" CommandArgument='<%#Eval("IsPrecious")%>' ></asp:LinkButton>
                        |
                        <asp:LinkButton ID="linkDrugs" runat="server" Text="按药品查看"
                        CommandName="Drugs" CommandArgument='<%#Eval("IsPrecious")%>' ></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="其它">
                    <ItemTemplate>
                        <asp:DropDownList ID="ddlOther" runat="server" AutoPostBack="True" 
                             onselectedindexchanged="ddlOther_SelectedIndexChanged" 
                            DataSourceID="XmlDataSource1" DataTextField="Name" DataValueField="Id">
                         </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged">
        </webdiyer:AspNetPager>
    </div> 
    
    <%--<asp:Button ID="btnExcel" runat="server" CssClass="btn" Text="导出数据"  
        onclick="btnExcel_Click" />--%>
        
    <div class="listip">
        <ul>
         <asp:LinkButton ID="lbtnSee" runat="server" onclick="lbtnSee_Click" 
                Font-Size="Small" Visible="false">显示图表</asp:LinkButton>
        <uc2:ChartControl ID="ChartControl1" 
                    runat="server" Visible="False" />
            <li>说明:<span>可以点击相应按钮进入查看详细信息</span>
            </li>
        </ul>
    </div>
</asp:Content>

